function [ fea, out ] = ex_poisson6( varargin )
%EX_POISSON6 3D Poisson equation example on a unit cube.
%
%   [ FEA, OUT ] = EX_POISSON6( VARARGIN ) Poisson equation on a [0..1]^3 unit cube.
%
%       Input       Value/{Default}        Description
%       -----------------------------------------------------------------------------------
%       igrid       scalar 1/{0}           Cell type (0=hexahedra, 1=tetrahedra)
%       hmax        scalar {1/9}           Max grid cell size
%       sfun        string {sflag1}        Shape function
%       iphys       scalar 0/{1}           Use physics mode to define problem    (=1)
%                                          or directly define fea.eqn/bdr fields (=0)
%       iplot       scalar 0/{1}           Plot solution (=1)
%                                                                                         .
%       Output      Value/(Size)           Description
%       -----------------------------------------------------------------------------------
%       fea         struct                 Problem definition struct
%       out         struct                 Output stuct

% Copyright 2013-2019 Precise Simulation, Ltd.


cOptDef = { ...
  'igrid',    0; ...
  'hmax',     1/9; ...
  'sfun',     'sflag1'; ...
  'iphys',    1; ...
  'icub',     2; ...
  'iplot',    1; ...
  'tol',      0.05; ...
  'fid',      1 };
[got,opt] = parseopt(cOptDef,varargin{:});
fid       = opt.fid;


% Geometry definition.
gobj = gobj_block();
fea.geom.objects = { gobj };


% Grid generation.
switch opt.igrid
  case -1
    fea.grid = blockgrid(round(1/opt.hmax));
    fea.grid = hex2tet(fea.grid);
  case 0
    fea.grid = blockgrid(round(1/opt.hmax));
  case 1
    fea.grid = gridgen(fea,'hmax',opt.hmax,'fid',fid);
end
n_bdr = max(fea.grid.b(3,:));           % Number of boundaries.


% Problem definition.
fea.sdim  = { 'x' 'y' 'z' };            % Coordinate names.
if ( opt.iphys==1 )

  fea = addphys(fea,@poisson);          % Add Poisson equation physics mode.
  fea.phys.poi.sfun = { opt.sfun };     % Set shape function.
  fea.phys.poi.eqn.coef{3,4} = { 1 };   % Set source term coefficient.
  fea.phys.poi.bdr.coef{1,end} = repmat({0},1,n_bdr);   % Set Dirichlet boundary coefficient to zero.
  fea = parsephys(fea);                 % Check and parse physics modes.

else

  fea.dvar  = { 'u' };                  % Dependent variable name.
  fea.sfun  = { opt.sfun  };            % Shape function.

  % Define equation system.
  fea.eqn.a.form = { [2 3 4;2 3 4] };   % First row indicates test function space   (2=x-derivative + 3=y-derivative),
                                        % second row indicates trial function space (2=x-derivative + 3=y-derivative).
  fea.eqn.a.coef = { 1 };               % Coefficient used in assembling stiffness matrix.

  fea.eqn.f.form = { 1 };               % Test function space to evaluate in right hand side (1=function values).
  fea.eqn.f.coef = { 1 };               % Coefficient used in right hand side.

  % Define boundary conditions.
  fea.bdr.d     = cell(1,n_bdr);
 [fea.bdr.d{:}] = deal(0);              % Assign zero to all boundaries (Dirichlet).

  fea.bdr.n     = cell(1,n_bdr);        % No Neumann boundaries ('fea.bdr.n' empty).

end


% Parse and solve problem.
fea       = parseprob(fea);             % Check and parse problem struct.
fea.sol.u = solvestat(fea,'fid',fid,'icub',opt.icub);   % Call to stationary solver.


% Postprocessing.
if ( opt.iplot>0 )
  p      = l_xgrid(fea.grid,opt.sfun);
  u_ref  = refsol_poi3dcube(p(:,1),p(:,2),p(:,3),3);
  figure
  subplot(1,2,1)
  postplot(fea,'surfexpr','u','selexpr','(y>0.5)','axequal','on')
  title('Solution u')
  subplot(1,2,2)
  postplot(fea,u_ref(1:size(fea.grid.p,2)),'surfexpr','u','selexpr','(y>0.5)','axequal','on')
  title('Reference Solution')
end


% Error checking.
x = linspace( 0+sqrt(eps), 1-sqrt(eps), 11 );
[x,y,z] = ndgrid(x,x,x);
u = evalexpr( 'u', [x(:) y(:) z(:)]', fea );
u_ref = refsol_poi3dcube( x(:), y(:), z(:), 6 );
err = sqrt(sum((u-u_ref).^2)/sum(u_ref.^2));
if( ~isempty(fid) )
  fprintf(fid,'\nL2 Error: %f\n',err)
  fprintf(fid,'\n\n')
end


out.err  = err;
out.pass = out.err<opt.tol;
if ( nargout==0 )
  clear fea out
end


%-----------------------------------------------
function p=l_xgrid(g,sfun)
% Create extendend grid coordinates.

ihex = size(g.c,1)==8;

pv = [];
if ( sfun(end)~='c' )
  pv = g.p';
end

pe = [];
if ( sfun(end)=='2' )
  [~,ev] = gridedge(g.c,3);
  pe = [ g.p(:,ev(:,1)) + g.p(:,ev(:,2)) ]'/2;
end

pf = [];
if ( ( sfun(end)=='2' && ihex==1 ) || ( sfun(end)=='c' ) )
  [~,fv] = gridface(g.c);
  pf = zeros(size(fv,1),3);
  for i=1:size(fv,2)
    pf = pf + g.p(:,fv(:,i))';
  end
  pf = pf/size(fv,2);
end

pc = [];
if ( sfun(end)=='2' && ihex==1 )
  pc = zeros(size(g.c,2),3);
  for i=1:3
    pc(:,i) = sum( reshape(g.p(i,g.c),size(g.c)) )'/8;
  end
end

p = [ pv; pe; pf; pc ];


%-----------------------------------------------
function u=refsol_poi3dcube(x,y,z,n_dacc)
% refsol_poi3dcube.m - Computes a reference solution to the Poisson equation on a unit cube.

xr = linspace( 0, 1, 11 );
[xr,yr,zr] = ndgrid(xr,xr,xr);
if( isequal(x,xr(:)) && isequal(y,yr(:)) && isequal(z,zr(:)) )
  u = refsol();
  n = inf;
  return
end

if ( nargin<3 )
  n_dacc = 5;          % Number of digits accuracy.
end
if ( size(x,1)<size(x,2) )
  x = x';
  y = y';
  z = z';
end
n_max  = 1000;       % Max number of expansions.

p = abs([x y z]-1/2);
[~,ia,ic] = unique(sort(p,2),'rows');
x = x(ia);
y = y(ia);
z = z(ia);


% Compute reference solution.
u = zeros(size(x));
for n=1:2:n_max

  u0 = u;

  k = n;
  c = 2^6/pi^5/k;
  sinkz = sin(k*pi*z);
  for i=1:2:n
    sinix = sin(i*pi*x);
    ind = 1:2:n;
    for jj=1:length(ind)
      j = ind(jj);
      u = u + c/(i*j)/(i^2+j^2+k^2) * sinix.*sin(j*pi*y).*sinkz;
    end
  end

  j = n;
  c = 2^6/pi^5/j;
  sinjy = sin(j*pi*y);
  for i=1:2:n
    sinix = sin(i*pi*x);
    ind = 1:2:n-2;
    for kk=1:length(ind)
      k = ind(kk);
      u = u + c/(i*k)/(i^2+j^2+k^2) * sinix.*sinjy.*sin(k*pi*z);
    end
  end

  i = n;
  c = 2^6/pi^5/i;
  sinix = sin(i*pi*x);
  for j=1:2:n-2
    sinjy = sin(j*pi*y);
    ind = 1:2:n-2;
    for kk=1:length(ind)
      k = ind(kk);
      u = u + c/(j*k)/(i^2+j^2+k^2) * sinix.*sinjy.*sin(k*pi*z);
    end
  end

  udiff = floor(u0*10^n_dacc)/(10^n_dacc) - ...
          floor( u*10^n_dacc)/(10^n_dacc);
  if ( any(udiff(:)) )
    continue
  end

  break
end

u = u(ic);

%-----------------------------------------------
function [ u ] = refsol()

u = [ ...
      3.2137211e-047;
      5.6251764e-033;
      6.1364366e-033;
      6.3591512e-033;
      6.4631356e-033;
      6.4940842e-033;
      6.4631356e-033;
      6.3591512e-033;
      6.1364366e-033;
      5.6251764e-033;
      3.2137211e-047;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.4940842e-033;
      6.1815350e-018;
      8.8008287e-018;
      1.0237086e-017;
      1.0971456e-017;
      1.1197797e-017;
      1.0971456e-017;
      1.0237086e-017;
      8.8008287e-018;
      6.1815350e-018;
      6.4940842e-033;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      3.2137211e-047;
      5.6251764e-033;
      6.1364366e-033;
      6.3591512e-033;
      6.4631356e-033;
      6.4940842e-033;
      6.4631356e-033;
      6.3591512e-033;
      6.1364366e-033;
      5.6251764e-033;
      3.2137211e-047;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      4.1350564e-018;
      6.4635594e-003;
      9.1880275e-003;
      1.0518519e-002;
      1.1157734e-002;
      1.1349685e-002;
      1.1157734e-002;
      1.0518519e-002;
      9.1880275e-003;
      6.4635594e-003;
      4.1350564e-018;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      6.1815350e-018;
      1.1349685e-002;
      1.7621360e-002;
      2.1168042e-002;
      2.2998218e-002;
      2.3564095e-002;
      2.2998218e-002;
      2.1168042e-002;
      1.7621360e-002;
      1.1349685e-002;
      6.1815350e-018;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      4.1350564e-018;
      6.4635594e-003;
      9.1880275e-003;
      1.0518519e-002;
      1.1157734e-002;
      1.1349685e-002;
      1.1157734e-002;
      1.0518519e-002;
      9.1880275e-003;
      6.4635594e-003;
      4.1350564e-018;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      7.2231525e-018;
      1.3723600e-002;
      2.1415209e-002;
      2.5667601e-002;
      2.7818136e-002;
      2.8476414e-002;
      2.7818136e-002;
      2.5667601e-002;
      2.1415209e-002;
      1.3723600e-002;
      7.2231525e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      8.8008287e-018;
      1.7621360e-002;
      2.8476414e-002;
      3.4895926e-002;
      3.8271868e-002;
      3.9323335e-002;
      3.8271868e-002;
      3.4895926e-002;
      2.8476414e-002;
      1.7621360e-002;
      8.8008287e-018;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      7.2231525e-018;
      1.3723600e-002;
      2.1415209e-002;
      2.5667601e-002;
      2.7818136e-002;
      2.8476414e-002;
      2.7818136e-002;
      2.5667601e-002;
      2.1415209e-002;
      1.3723600e-002;
      7.2231525e-018;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      9.4269464e-018;
      1.9149190e-002;
      3.1172808e-002;
      3.8334102e-002;
      4.2105582e-002;
      4.3280238e-002;
      4.2105582e-002;
      3.8334102e-002;
      3.1172808e-002;
      1.9149190e-002;
      9.4269464e-018;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      1.0237086e-017;
      2.1168042e-002;
      3.4895926e-002;
      4.3280238e-002;
      4.7766657e-002;
      4.9174459e-002;
      4.7766657e-002;
      4.3280238e-002;
      3.4895926e-002;
      2.1168042e-002;
      1.0237086e-017;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      9.4269464e-018;
      1.9149190e-002;
      3.1172808e-002;
      3.8334102e-002;
      4.2105582e-002;
      4.3280238e-002;
      4.2105582e-002;
      3.8334102e-002;
      3.1172808e-002;
      1.9149190e-002;
      9.4269464e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      1.0754187e-017;
      2.2455104e-002;
      3.7263055e-002;
      4.6416506e-002;
      5.1349920e-002;
      5.2903069e-002;
      5.1349920e-002;
      4.6416506e-002;
      3.7263055e-002;
      2.2455104e-002;
      1.0754187e-017;
      1.0971456e-017;
      2.2998218e-002;
      3.8271868e-002;
      4.7766657e-002;
      5.2903069e-002;
      5.4523023e-002;
      5.2903069e-002;
      4.7766657e-002;
      3.8271868e-002;
      2.2998218e-002;
      1.0971456e-017;
      1.0754187e-017;
      2.2455104e-002;
      3.7263055e-002;
      4.6416506e-002;
      5.1349920e-002;
      5.2903069e-002;
      5.1349920e-002;
      4.6416506e-002;
      3.7263055e-002;
      2.2455104e-002;
      1.0754187e-017;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.4940842e-033;
      6.1815350e-018;
      8.8008287e-018;
      1.0237086e-017;
      1.0971456e-017;
      1.1197797e-017;
      1.0971456e-017;
      1.0237086e-017;
      8.8008287e-018;
      6.1815350e-018;
      6.4940842e-033;
      6.1815350e-018;
      1.1349685e-002;
      1.7621360e-002;
      2.1168042e-002;
      2.2998218e-002;
      2.3564095e-002;
      2.2998218e-002;
      2.1168042e-002;
      1.7621360e-002;
      1.1349685e-002;
      6.1815350e-018;
      8.8008287e-018;
      1.7621360e-002;
      2.8476414e-002;
      3.4895926e-002;
      3.8271868e-002;
      3.9323335e-002;
      3.8271868e-002;
      3.4895926e-002;
      2.8476414e-002;
      1.7621360e-002;
      8.8008287e-018;
      1.0237086e-017;
      2.1168042e-002;
      3.4895926e-002;
      4.3280238e-002;
      4.7766657e-002;
      4.9174459e-002;
      4.7766657e-002;
      4.3280238e-002;
      3.4895926e-002;
      2.1168042e-002;
      1.0237086e-017;
      1.0971456e-017;
      2.2998218e-002;
      3.8271868e-002;
      4.7766657e-002;
      5.2903069e-002;
      5.4523023e-002;
      5.2903069e-002;
      4.7766657e-002;
      3.8271868e-002;
      2.2998218e-002;
      1.0971456e-017;
      1.1197797e-017;
      2.3564095e-002;
      3.9323335e-002;
      4.9174459e-002;
      5.4523023e-002;
      5.6212837e-002;
      5.4523023e-002;
      4.9174459e-002;
      3.9323335e-002;
      2.3564095e-002;
      1.1197797e-017;
      1.0971456e-017;
      2.2998218e-002;
      3.8271868e-002;
      4.7766657e-002;
      5.2903069e-002;
      5.4523023e-002;
      5.2903069e-002;
      4.7766657e-002;
      3.8271868e-002;
      2.2998218e-002;
      1.0971456e-017;
      1.0237086e-017;
      2.1168042e-002;
      3.4895926e-002;
      4.3280238e-002;
      4.7766657e-002;
      4.9174459e-002;
      4.7766657e-002;
      4.3280238e-002;
      3.4895926e-002;
      2.1168042e-002;
      1.0237086e-017;
      8.8008287e-018;
      1.7621360e-002;
      2.8476414e-002;
      3.4895926e-002;
      3.8271868e-002;
      3.9323335e-002;
      3.8271868e-002;
      3.4895926e-002;
      2.8476414e-002;
      1.7621360e-002;
      8.8008287e-018;
      6.1815350e-018;
      1.1349685e-002;
      1.7621360e-002;
      2.1168042e-002;
      2.2998218e-002;
      2.3564095e-002;
      2.2998218e-002;
      2.1168042e-002;
      1.7621360e-002;
      1.1349685e-002;
      6.1815350e-018;
      6.4940842e-033;
      6.1815350e-018;
      8.8008287e-018;
      1.0237086e-017;
      1.0971456e-017;
      1.1197797e-017;
      1.0971456e-017;
      1.0237086e-017;
      8.8008287e-018;
      6.1815350e-018;
      6.4940842e-033;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      1.0754187e-017;
      2.2455104e-002;
      3.7263055e-002;
      4.6416506e-002;
      5.1349920e-002;
      5.2903069e-002;
      5.1349920e-002;
      4.6416506e-002;
      3.7263055e-002;
      2.2455104e-002;
      1.0754187e-017;
      1.0971456e-017;
      2.2998218e-002;
      3.8271868e-002;
      4.7766657e-002;
      5.2903069e-002;
      5.4523023e-002;
      5.2903069e-002;
      4.7766657e-002;
      3.8271868e-002;
      2.2998218e-002;
      1.0971456e-017;
      1.0754187e-017;
      2.2455104e-002;
      3.7263055e-002;
      4.6416506e-002;
      5.1349920e-002;
      5.2903069e-002;
      5.1349920e-002;
      4.6416506e-002;
      3.7263055e-002;
      2.2455104e-002;
      1.0754187e-017;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      9.4269464e-018;
      1.9149190e-002;
      3.1172808e-002;
      3.8334102e-002;
      4.2105582e-002;
      4.3280238e-002;
      4.2105582e-002;
      3.8334102e-002;
      3.1172808e-002;
      1.9149190e-002;
      9.4269464e-018;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      1.0237086e-017;
      2.1168042e-002;
      3.4895926e-002;
      4.3280238e-002;
      4.7766657e-002;
      4.9174459e-002;
      4.7766657e-002;
      4.3280238e-002;
      3.4895926e-002;
      2.1168042e-002;
      1.0237086e-017;
      1.0047580e-017;
      2.0694520e-002;
      3.4017255e-002;
      4.2105582e-002;
      4.6416506e-002;
      4.7766657e-002;
      4.6416506e-002;
      4.2105582e-002;
      3.4017255e-002;
      2.0694520e-002;
      1.0047580e-017;
      9.4269464e-018;
      1.9149190e-002;
      3.1172808e-002;
      3.8334102e-002;
      4.2105582e-002;
      4.3280238e-002;
      4.2105582e-002;
      3.8334102e-002;
      3.1172808e-002;
      1.9149190e-002;
      9.4269464e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      7.2231525e-018;
      1.3723600e-002;
      2.1415209e-002;
      2.5667601e-002;
      2.7818136e-002;
      2.8476414e-002;
      2.7818136e-002;
      2.5667601e-002;
      2.1415209e-002;
      1.3723600e-002;
      7.2231525e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      8.8008287e-018;
      1.7621360e-002;
      2.8476414e-002;
      3.4895926e-002;
      3.8271868e-002;
      3.9323335e-002;
      3.8271868e-002;
      3.4895926e-002;
      2.8476414e-002;
      1.7621360e-002;
      8.8008287e-018;
      8.6585766e-018;
      1.7266118e-002;
      2.7818136e-002;
      3.4017255e-002;
      3.7263055e-002;
      3.8271868e-002;
      3.7263055e-002;
      3.4017255e-002;
      2.7818136e-002;
      1.7266118e-002;
      8.6585766e-018;
      8.1877628e-018;
      1.6095025e-002;
      2.5667601e-002;
      3.1172808e-002;
      3.4017255e-002;
      3.4895926e-002;
      3.4017255e-002;
      3.1172808e-002;
      2.5667601e-002;
      1.6095025e-002;
      8.1877628e-018;
      7.2231525e-018;
      1.3723600e-002;
      2.1415209e-002;
      2.5667601e-002;
      2.7818136e-002;
      2.8476414e-002;
      2.7818136e-002;
      2.5667601e-002;
      2.1415209e-002;
      1.3723600e-002;
      7.2231525e-018;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      4.1350564e-018;
      6.4635594e-003;
      9.1880275e-003;
      1.0518519e-002;
      1.1157734e-002;
      1.1349685e-002;
      1.1157734e-002;
      1.0518519e-002;
      9.1880275e-003;
      6.4635594e-003;
      4.1350564e-018;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      6.1815350e-018;
      1.1349685e-002;
      1.7621360e-002;
      2.1168042e-002;
      2.2998218e-002;
      2.3564095e-002;
      2.2998218e-002;
      2.1168042e-002;
      1.7621360e-002;
      1.1349685e-002;
      6.1815350e-018;
      6.1046276e-018;
      1.1157734e-002;
      1.7266118e-002;
      2.0694520e-002;
      2.2455104e-002;
      2.2998218e-002;
      2.2455104e-002;
      2.0694520e-002;
      1.7266118e-002;
      1.1157734e-002;
      6.1046276e-018;
      5.8473707e-018;
      1.0518519e-002;
      1.6095025e-002;
      1.9149190e-002;
      2.0694520e-002;
      2.1168042e-002;
      2.0694520e-002;
      1.9149190e-002;
      1.6095025e-002;
      1.0518519e-002;
      5.8473707e-018;
      5.3044513e-018;
      9.1880275e-003;
      1.3723600e-002;
      1.6095025e-002;
      1.7266118e-002;
      1.7621360e-002;
      1.7266118e-002;
      1.6095025e-002;
      1.3723600e-002;
      9.1880275e-003;
      5.3044513e-018;
      4.1350564e-018;
      6.4635594e-003;
      9.1880275e-003;
      1.0518519e-002;
      1.1157734e-002;
      1.1349685e-002;
      1.1157734e-002;
      1.0518519e-002;
      9.1880275e-003;
      6.4635594e-003;
      4.1350564e-018;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      3.2137211e-047;
      5.6251764e-033;
      6.1364366e-033;
      6.3591512e-033;
      6.4631356e-033;
      6.4940842e-033;
      6.4631356e-033;
      6.3591512e-033;
      6.1364366e-033;
      5.6251764e-033;
      3.2137211e-047;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.4940842e-033;
      6.1815350e-018;
      8.8008287e-018;
      1.0237086e-017;
      1.0971456e-017;
      1.1197797e-017;
      1.0971456e-017;
      1.0237086e-017;
      8.8008287e-018;
      6.1815350e-018;
      6.4940842e-033;
      6.4631356e-033;
      6.1046276e-018;
      8.6585766e-018;
      1.0047580e-017;
      1.0754187e-017;
      1.0971456e-017;
      1.0754187e-017;
      1.0047580e-017;
      8.6585766e-018;
      6.1046276e-018;
      6.4631356e-033;
      6.3591512e-033;
      5.8473707e-018;
      8.1877628e-018;
      9.4269464e-018;
      1.0047580e-017;
      1.0237086e-017;
      1.0047580e-017;
      9.4269464e-018;
      8.1877628e-018;
      5.8473707e-018;
      6.3591512e-033;
      6.1364366e-033;
      5.3044513e-018;
      7.2231525e-018;
      8.1877628e-018;
      8.6585766e-018;
      8.8008287e-018;
      8.6585766e-018;
      8.1877628e-018;
      7.2231525e-018;
      5.3044513e-018;
      6.1364366e-033;
      5.6251764e-033;
      4.1350564e-018;
      5.3044513e-018;
      5.8473707e-018;
      6.1046276e-018;
      6.1815350e-018;
      6.1046276e-018;
      5.8473707e-018;
      5.3044513e-018;
      4.1350564e-018;
      5.6251764e-033;
      3.2137211e-047;
      5.6251764e-033;
      6.1364366e-033;
      6.3591512e-033;
      6.4631356e-033;
      6.4940842e-033;
      6.4631356e-033;
      6.3591512e-033;
      6.1364366e-033;
      5.6251764e-033;
      3.2137211e-047];
